var htmlbaojindeviceId;
var htmlbaojinLevel;
function panduanbaojin() {
    //DeviceDatalist
    // 消防 PDJCXF
    htmlbaojindeviceId = DeviceDatalist[0].deviceId
    htmlbaojinLevel = DeviceDatalist[0].description
    document.getElementById("mainhtmlId").className = ""
    document.getElementById("FireProtectionSystemId").className = ""
    document.getElementById("FireProtectionSystempId").className = "divgg"
    if (htmlbaojindeviceId == "PDJCXF" && htmlbaojinLevel == "0") {

        document.getElementById("FireProtectionSystemId").className = "light2"
    }
    //FireProtectionSystempId
    if (htmlbaojindeviceId == "PDJCXF" && htmlbaojinLevel == "1") {

        document.getElementById("FireProtectionSystempId").className = "divgg light2"
    }
    if (htmlbaojinLevel == "2" || htmlbaojinLevel == "3") {

        document.getElementById("mainhtmlId").className = "light3"
    }

    if (htmlbaojindeviceId == "PDJCXF" && htmlbaojinLevel == "3") {
        // berforeJinjibaoji()
        xiaofangSysClass()
    }
    //雷电预警 pdjcld
    document.getElementById("lightningwarningId").className = ""
    document.getElementById("lightningwarningpId").className = "divgg"
    if (htmlbaojindeviceId == "PDJCLD" && htmlbaojinLevel == "0") {
        document.getElementById("lightningwarningId").className = "light2"
    }

    if (htmlbaojindeviceId == "PDJCLD" && htmlbaojinLevel == "1") {
        document.getElementById("lightningwarningpId").className = "divgg light2"
    }
    //lightningwarningpId
    // 管道测漏 pdcl
    document.getElementById("PipelineleakdetectionId").className = ""
    document.getElementById("PipelineleakdetectionpId").className = "divgg2"
    if (htmlbaojindeviceId == "pdcl" && htmlbaojinLevel == "0") {
        document.getElementById("PipelineleakdetectionId").className = "light2"
    }
    //PipelineleakdetectionpId
    if (htmlbaojindeviceId == "pdcl" && htmlbaojinLevel == "1") {
        document.getElementById("PipelineleakdetectionpId").className = "divgg2 light2"
    }
    // 可燃气体 JCKRQT
    document.getElementById("GasId").className = ""
    document.getElementById("GaspId").className = "divgg2"
    if (htmlbaojindeviceId == "JCKRQT" && htmlbaojinLevel == "0") {
        document.getElementById("GasId").className = "light2"
    }
    //GaspId
    if (htmlbaojindeviceId == "JCKRQT" && htmlbaojinLevel == "1") {
        document.getElementById("GaspId").className = "divgg2 light2"
    }

    //自控系统 jczk
    document.getElementById("AutomaticcontrolsystemId").className = ""
    document.getElementById("AutomaticcontrolsystempId").className = "divgg"
    if (htmlbaojindeviceId == "jczk" && htmlbaojinLevel == "0") {
        document.getElementById("AutomaticcontrolsystemId").className = "light2"
    }
    if (htmlbaojindeviceId == "jczk" && htmlbaojinLevel == "1") {
        document.getElementById("AutomaticcontrolsystempId").className = "divgg light2"
    }
    //AutomaticcontrolsystempId
}
function panduanbaojin2(obj) {
    document.getElementById("mainhtmlId").className = ""
    if (obj.deviceId == "PDJCXF" && obj.description == "0") {
        document.getElementById("FireProtectionSystemId").className = ""
    }
    if (obj.deviceId == "PDJCXF" && obj.description == "1") {
        document.getElementById("FireProtectionSystempId").className = "divgg"
    }


    if (obj.deviceId == "PDJCLD" && obj.description == "0") {
        document.getElementById("lightningwarningId").className = ""
    }
    if (obj.deviceId == "PDJCXF" && obj.description == "1") {
        document.getElementById("lightningwarningpId").className = "divgg"
    }

    if (obj.deviceId == "pdcl" && obj.description == "0") {
        document.getElementById("PipelineleakdetectionId").className = ""
    }
    if (obj.deviceId == "pdcl" && obj.description == "1") {
        document.getElementById("PipelineleakdetectionpId").className = "divgg2"
    }

    if (obj.deviceId == "JCKRQT" && obj.description == "0") {
        document.getElementById("GasId").className = ""
    }
    if (obj.deviceId == "JCKRQT" && obj.description == "1") {
        document.getElementById("GaspId").className = "divgg2"
    }

    if (obj.deviceId == "jczk" && obj.description == "0") {
        document.getElementById("AutomaticcontrolsystemId").className = ""
    }
    if (obj.deviceId == "jczk" && obj.description == "1") {
        document.getElementById("AutomaticcontrolsystempId").className = "divgg"
    }
}

$(function () {
    $('.popupClose9').on('click', function () {
        $('.popupClose9').css('display', 'none');
        $('.popup9').animate({ width: '3px' }, 400, function () {
            $('.popup9').animate({ height: 0 }, 400);
        });
        setTimeout(summaryHide9, 800);
    });


})
function summaryHide9() {
    $('.filterbg9').hide();
    $('.popup9').hide();
    $('.popup9').width(0);
};


function berforeJinjibaoji() {

    $('.popupClose9').css('display', 'none');
    $('.popup9').animate({ width: '3px' }, 400, function () {
        $('.popup9').animate({ height: 0 }, 400);
    });
    // $('.filterbg9').hide();
    // $('.popup9').hide();
    // $('.popup9').width(0);

    setTimeout(function () {
        // $('.popupClose9').css('display', 'none');
        // $('.popup9').animate({ width: '3px' }, 400, function () {
        //     $('.popup9').animate({ height: 0 }, 400);
        // });
        $('.filterbg9').show();
        $('.popup9').show();
        $('.popup9').width('3px');
        $('.popup9').animate({ height: '56%' }, 400, function () {
            $('.popup9').animate({ width: '53%' }, 400);
        });
        // $('.popupClose9').css('display', 'block');
    }, 500)

    setTimeout(summaryShow9, 800);

}

function summaryShow9() {
    $('.popupClose9').css('display', 'block');
}